package com.mgl.util;

public class Point {
	
	private float x;
	private float y;
	
	public Point(float x, float y) {
		super();
		this.x = x;
		this.y = y;
	}
	
	public static float distanceBetween(Point p1, Point p2){
		
		float x = p1.getX()-p2.getX();
		float y = p1.getY()-p2.getY();
		
		return (float) Math.sqrt( (x*x) + (y*y)); 
	}
	
	public static float angleBetween(Point p1, Point p2){
		
		float x = p2.getX()-p1.getX();
		float y = p2.getY()-p1.getY();
		
				
		
		
		return (float) Math.atan2(y, x);
		
	}
	
	public float getX() {
		return x;
	}

	public void setX(float x) {
		this.x = x;
	}

	public float getY() {
		return y;
	}

	public void setY(float y) {
		this.y = y;
	}
	
	

}
